package com.pj.wisdomlogistics.mvp.presenter;


import com.pj.wisdomlogistics.entity.ServicePersonnel;
import com.pj.wisdomlogistics.mvp.contract.PoritionContract;
import com.pj.wisdomlogistics.mvp.frame.ActivityPresenter;
import com.pj.wisdomlogistics.mvp.model.PoritionModel;
import com.pj.wisdomlogistics.rx.FilterSubscriber;

import java.util.List;


public class PoritionPresenter extends ActivityPresenter<PoritionModel,PoritionContract.View> implements PoritionContract.Presenter{
    public static final String TAG = "PoritionPresenter";

    @Override
    public void findAllServer() {
        addSubscription(getModel().findAllServer(), new FilterSubscriber<List<ServicePersonnel>>() {
            @Override
            public void onNext(List<ServicePersonnel> mList) {
                getView().onSuccess(mList);
            }

            @Override
            public void onError(int errorCode, String errorMsg) {
                getView().onError(errorMsg);
            }


        });
    }
}
